package com.sjq.common.web;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class DictTreeController {
    private static final String INITURL = "/sys-manage/dict-manage";
	// 单选树
	@RequestMapping(INITURL+"/dict-singleTree")
	public ModelAndView categoryTreeInit(String category) {
		Map<String,String> map = new HashMap<String, String>();
		map.put("category", category);
		return new ModelAndView("/view/dict/dictSingleTree",map);
	}
	
	// 多选树
	@RequestMapping(INITURL+"/dict-multipleTree")
	public ModelAndView categoryTreeInitView(String category) {
		Map<String,String> map = new HashMap<String, String>();
		map.put("category", category);
		return new ModelAndView("/view/dict/dictMultipleTree",map);
	}
	
	// 单位树多选
	@RequestMapping(INITURL+"/dict-dwTree")
	public ModelAndView categoryTreeDw(String dwbm,String dwmc) {
		Map<String,String> map = new HashMap<String, String>();
		map.put("dwbm", dwbm);
		map.put("dwmc", dwmc);
		return new ModelAndView("/view/dict/dwTree",map);
	}
	// 单位树单选
		@RequestMapping(INITURL+"/dict-dwDxTree")
		public ModelAndView categoryDanxuanTreeDw(String dwbm,String dwmc) {
			Map<String,String> map = new HashMap<String, String>();
			map.put("dwbm", dwbm);
			map.put("dwmc", dwmc);
			return new ModelAndView("/view/dict/dwDxTree",map);
		}
	
	//字典选择
	@RequestMapping(INITURL+"/dict-singleTreeZD")
	public ModelAndView categoryTreeInitZD(String category ,String dm,String mc) {
		Map<String,String> map = new HashMap<String, String>();
		map.put("category", category);
		map.put("dm", dm);
		map.put("mc", mc);
		return new ModelAndView("/view/dict/dictSingleTree",map);
	}

}
